package lijun;

public class test2 {
    public static void main(String[] args) {
        YZT yzt = new YZT();
        System.out.println("体积和表面积: " + yzt.calTJ() + yzt.calBMJ());
        YZT yzt1 = null;
        try {
            yzt1 = new YZT(2.0, -10.5);
            System.out.println("体积和表面积: " + yzt1.calTJ() + yzt1.calBMJ());
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        YZT yzt2 = null;
        try {
            yzt2 = new YZT(12.5, 11.0);
            System.out.println("体积和表面积: " + yzt2.calTJ() + yzt2.calBMJ());
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
